-- SQL Manager 2008 for SQL Server 3.3.0.1
-- ---------------------------------------
-- Host      : SQLSRV\SQLEXPRESS
-- Database  : PDFDB
-- Version   : Microsoft SQL Server  10.50.1600.1


CREATE DATABASE [PDFDB]
ON PRIMARY
  ( NAME = [PDFDB],
    FILENAME = 'D:\SQLBases\PDFDB.mdf',
    SIZE = 2304 KB,
    MAXSIZE = UNLIMITED,
    FILEGROWTH = 1 MB )
LOG ON
  ( NAME = [PDFDB_log],
    FILENAME = 'D:\SQLBases\PDFDB_log.LDF',
    SIZE = 504 KB,
    MAXSIZE = 0 MB,
    FILEGROWTH = 10 % )
COLLATE SQL_Latin1_General_CP1_CI_AS
GO

USE [PDFDB]
GO

--
-- Definition for table Classifiers : 
--

CREATE TABLE [dbo].[Classifiers] (
  [TypeID] int NULL,
  [Code] int NOT NULL,
  [Name] varchar(150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)
ON [PRIMARY]
GO

--
-- Definition for table ClassifierTypes : 
--

CREATE TABLE [dbo].[ClassifierTypes] (
  [TypeID] int IDENTITY(1, 1) NOT NULL,
  [Description] varchar(150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)
ON [PRIMARY]
GO

--
-- Definition for table PDFConfig : 
--

CREATE TABLE [dbo].[PDFConfig] (
  [TableID] int NOT NULL,
  [Row] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  [RowSpan] int NULL,
  [Column] int NOT NULL,
  [ColSpan] int NULL,
  [ContentType] int NULL,
  [ContentText] text COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  [TextFont] int NULL,
  [FontSize] int NULL,
  [TextAlign] int NULL,
  [BorderColor] int NULL,
  [BackGroundColor] int NULL,
  [FontEncoding] int NULL,
  [FontStyle] int NULL,
  [FontColor] int NULL,
  [TextRotation] int NULL
)
ON [PRIMARY]
TEXTIMAGE_ON [PRIMARY]
GO

--
-- Data for table dbo.Classifiers  (LIMIT 0,500)
--

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (0, 0, N'UNSPECIFIED')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 1, N'BLACK')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 2, N'BLUE')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 3, N'CYAN')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 4, N'DARK_GRAY')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 5, N'GRAY')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 6, N'GREEN')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 7, N'LIGHT_GRAY')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 8, N'MAGENTA')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 9, N'ORANGE')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 10, N'PINK')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 11, N'RED')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 12, N'WHITE')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (1, 13, N'YELLOW')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 14, N'BLACK')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 15, N'BLUE')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 16, N'CYAN')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 17, N'DARK_GRAY')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 18, N'GRAY')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 19, N'GREEN')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 20, N'LIGHT_GRAY')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 21, N'MAGENTA')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 22, N'ORANGE')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 23, N'PINK')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 24, N'RED')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 25, N'WHITE')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (2, 26, N'YELLOW')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (5, 27, N'ALIGN_BASELINE')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (5, 28, N'ALIGN_BOTTOM')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (5, 29, N'ALIGN_CENTER')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (5, 30, N'ALIGN_JUSTIFIED')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (5, 31, N'ALIGN_JUSTIFIED_ALL')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (5, 32, N'ALIGN_LEFT')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (5, 33, N'ALIGN_MIDDLE')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (5, 34, N'ALIGN_RIGHT')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (5, 35, N'ALIGN_TOP')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (5, 36, N'ALIGN_UNDEFINED')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (3, 37, N'TIMES_ROMAN')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (3, 38, N'TIMES_ITALIC')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (3, 39, N'TIMES_BOLD')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (3, 40, N'TIMES_BOLDITALIC')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (8, 41, N'WINANSI')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (9, 42, N'NORMAL')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (6, 43, N'Text')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (6, 44, N'Image')
GO

INSERT INTO [dbo].[Classifiers] ([TypeID], [Code], [Name])
VALUES 
  (6, 45, N'Table')
GO

--
-- Data for table dbo.ClassifierTypes  (LIMIT 0,500)
--

SET IDENTITY_INSERT [dbo].[ClassifierTypes] ON
GO

INSERT INTO [dbo].[ClassifierTypes] ([TypeID], [Description])
VALUES 
  (1, N'Border Color')
GO

INSERT INTO [dbo].[ClassifierTypes] ([TypeID], [Description])
VALUES 
  (2, N'BackGround Color')
GO

INSERT INTO [dbo].[ClassifierTypes] ([TypeID], [Description])
VALUES 
  (3, N'Font')
GO

INSERT INTO [dbo].[ClassifierTypes] ([TypeID], [Description])
VALUES 
  (4, N'Font Size')
GO

INSERT INTO [dbo].[ClassifierTypes] ([TypeID], [Description])
VALUES 
  (5, N'Text Align')
GO

INSERT INTO [dbo].[ClassifierTypes] ([TypeID], [Description])
VALUES 
  (6, N'Content Cell Type')
GO

INSERT INTO [dbo].[ClassifierTypes] ([TypeID], [Description])
VALUES 
  (7, N'Font Color')
GO

INSERT INTO [dbo].[ClassifierTypes] ([TypeID], [Description])
VALUES 
  (8, N'Font Encoding')
GO

INSERT INTO [dbo].[ClassifierTypes] ([TypeID], [Description])
VALUES 
  (9, N'Font Stile')
GO

SET IDENTITY_INSERT [dbo].[ClassifierTypes] OFF
GO

--
-- Data for table dbo.PDFConfig  (LIMIT 0,500)
--

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (0, N'1', 2, 1, 1, 43, N'Cell 1 Cell 1 Cell 1 Cell 1 Cell 1 Cell 1 Cell 1 Cell 1 Cell 1', 37, 14, 29, 0, 15, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (0, N'1', 1, 2, 2, 43, N'Cell 2 Cell 2', 37, 14, 29, 0, 18, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (0, N'2', 2, 2, 2, 45, N'1', 37, 14, 29, 0, 22, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (0, N'3', 1, 1, 1, 43, N'Cell 4', 37, 14, 29, 0, 24, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'1', 1, 1, 1, 43, NULL, 37, 14, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'1', 1, 2, 1, 43, N'A. Prec.', 37, 14, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'1', 1, 3, 1, 43, N'Spett', 37, 14, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'1', 1, 4, 1, 43, N'Godute', 37, 14, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'2', 1, 1, 1, 43, N'Ferie', 37, 14, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'2', 1, 2, 1, 43, N'25.69', 37, 11, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'2', 1, 3, 1, 43, N'16.52', 37, 11, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'2', 1, 4, 1, 43, N'24.00', 37, 11, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'3', 1, 1, 1, 43, N'R.O.L.', 37, 14, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'3', 1, 2, 1, 43, N'149.32', 37, 11, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'3', 1, 3, 1, 43, N'41.99', 37, 11, 29, 7, 0, 41, 37, 1, 0)
GO

INSERT INTO [dbo].[PDFConfig] ([TableID], [Row], [RowSpan], [Column], [ColSpan], [ContentType], [ContentText], [TextFont], [FontSize], [TextAlign], [BorderColor], [BackGroundColor], [FontEncoding], [FontStyle], [FontColor], [TextRotation])
VALUES 
  (1, N'3', 1, 4, 1, 43, N'--', 37, 14, 29, 7, 0, 41, 37, 1, 0)
GO

--
-- Definition for indices : 
--

ALTER TABLE [dbo].[Classifiers]
ADD CONSTRAINT [PK__Classifi__A25C5AA60425A276] 
PRIMARY KEY CLUSTERED ([Code])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[ClassifierTypes]
ADD CONSTRAINT [PK__Classifi__516F039500551192] 
PRIMARY KEY CLUSTERED ([TypeID])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO





CREATE TABLE [dbo].[users](
	[userid] [int] IDENTITY(1,1) NOT NULL,
	[firstname]  varchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[lastname] varchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[login] varchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[password] varchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[roletype] [int] NULL,
	[passwordstatus] [int] NULL,
	[recordstatus] [int] NULL,
	[edituserid] [int] NULL,
	[editdate] [datetime] NULL,
	[email] varchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 
)

